banner

SNAP - 05: Introducing Boolean Characters

OPENING QUESTIONS: Let's say you wrote a menu so that a user could select from several different options for their frozen yogurt: Something like this:

Please choose ONE sauce selection from the list below:

Marsh mellow Sauce

Hot Fudge Sauce

Peanut Butter Sauce

Banana Sauce

Please choose your frozen yogurt toppings from the list below:

M & Ms

Reese's Piece se

Heath Bar Pieces

Marsh mellows

 

 

OBJECTIVE:   I will be able to write a statement using basic Boolean Logic during today's class

WORD FOR TODAY:

Boolean (true or false, yes or no, on or off, 1 or 0)

  • or
  • and
  • not

WORK O' THE DAY

How would you write out an order from that list?

Notice the first list ONLY let's you select one item. Those objects are called 'radio buttons'. I don't believe radio buttons are available in SNAP

Notice the second list allows us to select as many options as we want. Those objects are called 'check boxes'. I don't think SNAP let's us use those either.

Let's improvise -- work with your team to write just the first menu options.

If the user *does* make two selections, write a message to the user that says "Please choose only ONE topping"

If the user makes ONLY one selection, send a note to the user that says "Thanks for your order!"